<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,body{
            width: 100%;
            height: 100%;
        }
        .box{
            width: 200px;
            height: 200px;
            margin-left: 300px;
            margin-top: 100px;
            background: #c92007;
        }
    </style>
</head>
<body>
<div class="box">
    <button id="btn1">皮肤1</button>
    <button id="btn2">皮肤2</button>
</div>
    <script>
        // 网页换肤, 点击皮肤1, 切换到第一张图的效果, 点击皮肤2切换到第二张图的效果
        var oBtn1=document.getElementById("btn1");
        var oBtn2=document.getElementById("btn2");

        oBtn1.onclick=function(){
            document.body.style.backgroundImage="url(images/t1.jpg)";
        }
        oBtn2.onclick=function(){
            document.body.style.backgroundImage="url(images/t2.jpg)";
        }
    </script>
</body>
</html>